package com.yulong.web.controller;

import com.yulong.model.pojo.UmsResource;
import com.yulong.model.pojo.UmsResourceCategory;
import com.yulong.web.server.UmsResourcServer;
import com.yulong.web.server.UmsResourceCategoryServer;
import com.yulong.web.utils.ResponseMap;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api("后台资源管理")
@RequestMapping("resource")
public class UmsResourceController {

    @Autowired
    private UmsResourcServer umsResourcServer;


    @ApiOperation("获取所有分类资源")
    @GetMapping("listAll")
    private ResponseMap listAll(){
        List<UmsResource> list = umsResourcServer.list(null, null, null);
        return ResponseMap.ok(list);

    }

}
